imports:
    - { resource: ./../config/framework.yml }

security:
    password_hashers:
        Symfony\Component\Security\Core\User\InMemoryUser: plaintext

    providers:
        in_memory:
            memory:
                users:
                    dunglas: { password: foo, roles: [ROLE_USER] }

    firewalls:
        main:
            pattern: ^/
            json_login:
               check_path:    /chk
               username_path: user.login
               password_path: user.password
               success_handler: json_login.success_handler
               failure_handler: json_login.failure_handler

    access_control:
        - { path: ^/foo, roles: ROLE_USER }

services:
    json_login.success_handler:
        class: Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\JsonLoginBundle\Security\Http\JsonAuthenticationSuccessHandler
    json_login.failure_handler:
        class: Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\JsonLoginBundle\Security\Http\JsonAuthenticationFailureHandler
